package com.campus.backend.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.campus.common.mybatis.entity.IntegerIdBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 积分记录表
 * </p>
 *
 * @author ZhaoYuJie
 * @since 2025-05-12
 */
@Getter
@Setter
@TableName("points_record")
@ApiModel(value = "PointsRecord对象", description = "积分记录表")
public class PointsRecord extends IntegerIdBaseEntity<PointsRecord> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户ID")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("用户手机号")
    @TableField("user_phone")
    private String userPhone;

    @ApiModelProperty("积分变动值")
    @TableField("points")
    private Integer points;

    @ApiModelProperty("类型：1-获得，2-消费")
    @TableField("type")
    private Integer type;

    @ApiModelProperty("来源：order-订单，exchange-兑换，sign-签到")
    @TableField("source")
    private String source;

    @ApiModelProperty("来源ID")
    @TableField("source_id")
    private String sourceId;

    @ApiModelProperty("描述")
    @TableField("description")
    private String description;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @Override
    public Serializable pkVal() {
        return null;
    }
}
